package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_ema_trts database table.
 * 
 */
@Entity
@Table(name="per_ema_trts")
@NamedQuery(name="PerEmaTrts.findAll", query="SELECT p FROM PerEmaTrts p")
public class PerEmaTrts implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int trtsid;

	private String trtsfens;

	//bi-directional many-to-one association to PerEmaDa
	@ManyToOne
	@JoinColumn(name="DAID")
	private PerEmaDa perEmaDa;

	//bi-directional many-to-one association to PerRetWen
	@OneToMany(mappedBy="perEmaTrt")
	private List<PerRetWen> perRetWens;

	//bi-directional many-to-one association to PerTngRet
	@OneToMany(mappedBy="perEmaTrt")
	private List<PerTngRet> perTngRets;

	public PerEmaTrts() {
	}

	public int getTrtsid() {
		return this.trtsid;
	}

	public void setTrtsid(int trtsid) {
		this.trtsid = trtsid;
	}

	public String getTrtsfens() {
		return this.trtsfens;
	}

	public void setTrtsfens(String trtsfens) {
		this.trtsfens = trtsfens;
	}

	public PerEmaDa getPerEmaDa() {
		return this.perEmaDa;
	}

	public void setPerEmaDa(PerEmaDa perEmaDa) {
		this.perEmaDa = perEmaDa;
	}

	public List<PerRetWen> getPerRetWens() {
		return this.perRetWens;
	}

	public void setPerRetWens(List<PerRetWen> perRetWens) {
		this.perRetWens = perRetWens;
	}

	public PerRetWen addPerRetWen(PerRetWen perRetWen) {
		getPerRetWens().add(perRetWen);
		perRetWen.setPerEmaTrt(this);

		return perRetWen;
	}

	public PerRetWen removePerRetWen(PerRetWen perRetWen) {
		getPerRetWens().remove(perRetWen);
		perRetWen.setPerEmaTrt(null);

		return perRetWen;
	}

	public List<PerTngRet> getPerTngRets() {
		return this.perTngRets;
	}

	public void setPerTngRets(List<PerTngRet> perTngRets) {
		this.perTngRets = perTngRets;
	}

	public PerTngRet addPerTngRet(PerTngRet perTngRet) {
		getPerTngRets().add(perTngRet);
		perTngRet.setPerEmaTrt(this);

		return perTngRet;
	}

	public PerTngRet removePerTngRet(PerTngRet perTngRet) {
		getPerTngRets().remove(perTngRet);
		perTngRet.setPerEmaTrt(null);

		return perTngRet;
	}

}